package com.love.testnetwork;


import com.love.testnetwork.entity.BaseResponse;
import com.love.testnetwork.entity.GuestureEntity;
import com.love.testnetwork.entity.UserEntity;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;


/**
 * Created by zf on 2016/11/25.
 */

public interface ApiService {

    @POST("information/getuserinfo")
    Call<BaseResponse<UserEntity>> getUserInfo(@Query("userid") String userid, @Query("session") String session);


    @POST("setting/getGuestureInfo")
    Call<GuestureEntity> getGuestureInfo(@QueryMap(encoded = true) Map<String, String> options);

    @Multipart
    @POST
    Call<ResponseBody> updateImage(@Url String url, @QueryMap(encoded = true) Map<String, String> map, @Part("fileName") String description, @Part("file\"; filename=\"image.jpg\"") RequestBody imgs);

    /////////////////

    @POST("information/getuserinfo")
    rx.Observable<BaseResponse<UserEntity>> getInfo(@Query("userid") String userid, @Query("session") String session);

    @POST("setting/getGuestureInfo")
    rx.Observable<GuestureEntity> getGuesture(@Query("userid") String userid, @Query("session") String session, @Query("imei") String imei);
}
